package com.xjgc.eip.twice.zxjeip2cxtld.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjgc.eip.twice.zxjeip2cccjc.entity.ZxjEip2cCcjc;
import com.xjgc.eip.twice.zxjeip2cxtld.entity.ZxjEip2cXtld;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhanghongbin
 * @since 2019-11-23
 */
public interface ZxjEip2cXtldMapper extends BaseMapper<ZxjEip2cXtld> {

    /*@Select("select count(*) from zxj_mes_vbeln where \"VBELN\" = #{vbeln} group by \"VBELN\"")*/
    public String contByVbeln(@Param("vbeln")String vbeln);
    /**
     * <p>
     *  根据合同号统计同一合同数量
     * </p>
     */
   /* @Select("select count(*) from zxj_eip_2c_ccjc " +
            "where 1=1 AND \"CONTRACT_NUMBER\" = #{contractNumber,jdbcType=STRING} " +
            "and \"REVIEW_STATUS\" = #{reviewStatus,jdbcType=String}" +
            "group by \"CONTRACT_NUMBER\"" )*/
    public String contByCCjc(@Param("contractNumber") String contractNumber,@Param("reviewStatus") String reviewStatus);
/**
 * <p>
 *  去重查询
 * </p>
  */
    /*@Select("select * from zxj_eip_2c_ccjc where  tid in " +
            "(select max(tid) from zxj_eip_2c_ccjc group by \"CONTRACT_NUMBER\")" +
            " AND \"CONTRACT_NUMBER\"  = #{contractNumber,jdbcType=STRING}" +
            " and \"REVIEW_STATUS\" = #{reviewStatus,jdbcType=STRING}")*/
    public List<ZxjEip2cCcjc> getByCcjc(@Param("contractNumber") String contractNumber,@Param("reviewStatus") String reviewStatus);


    public List<ZxjEip2cXtld> findByCcList(@Param("contractNumber") String contractNumber);

    public Boolean insertBatch(List<ZxjEip2cXtld> data);
}
